package com.ruoyi.web.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.validator.group.AddGroup;
import com.ruoyi.common.validator.group.UpdateGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("poi_apply")
public class PoiApply extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    private Long userId;

    private String nickName;

    private Long deptId;

    private String deptName;

    private Long tableId;

    private String tableName;

    private Integer quotaFrom;

    private Integer numItem;

    private Integer numTimes;

    private Double score;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date timeStart;

    private Date timeEnd;

    private Integer year;

    private Integer quarter;

    private Integer month;

    private Integer applyStatus;

    @TableLogic
    private Integer delStatus;

    @TableField(exist = false)
    private List<PoiApplyItem> poiApplyItemList;

    @TableField(exist = false)
    private List<PoiApplyImage> poiApplyImages;

    @TableField(exist = false)
    private List<UcQuoProject> ucQuoProjects;

    @TableField(exist = false)
    @NotEmpty(groups = {AddGroup.class, UpdateGroup.class},message = "请上传附件")
    @Size(min = 1)
    private List<String> imgList;

    @TableField(exist = false)
    private Map<Long,PoiApplyItem> poiApplyItemMap;

    @TableField(exist = false)
    private Integer pass;

    @TableField(exist = false)
    private String notes;

    @TableField(exist = false)
    private Double score1;

    @TableField(exist = false)
    private Double score2;

}
